Packages

Data Wrangling: HIV Death data

country    object
1990       object
1991       object
1992       object
1993       object
1994       object
1995       object
1996       object
1997       object
1998       object
1999       object
2000       object
2001       object
2002       object
2003       object
2004       object
2005       object
2006       object
2007       object
2008       object
2009       object
2010       object
2011       object
dtype: object
['1990', '1991', '1992', '1993', '1994', '1995', '1996', '1997', '1998', '1999', '2000', '2001', '2002', '2003', '2004', '2005', '2006', '2007', '2008', '2009', '2010', '2011']
country 1990 1991 1992 1993 1994 1995 1996 1997 1998 ... 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011
0 Afghanistan 60.0 60.0 60.0 60.0 60.0 150.0 150.0 150.0 150.0 ... 150.0 150.0 350.0 350.0 350.0 350.0 350.0 350.0 350.0 350.0
1 Angola 600.0 1200.0 1800.0 2500.0 3300.0 4300.0 5300.0 6300.0 7300.0 ... 11000.0 12000.0 12000.0 13000.0 13000.0 13000.0 12000.0 11000.0 NaN NaN
2 Argentina 3000.0 3200.0 3400.0 3600.0 3800.0 3500.0 3200.0 3100.0 3000.0 ... 2800.0 2900.0 3100.0 3200.0 3200.0 3200.0 3000.0 2900.0 NaN NaN
3 Armenia 60.0 60.0 60.0 60.0 60.0 60.0 60.0 60.0 60.0 ... 350.0 350.0 350.0 350.0 350.0 350.0 350.0 350.0 350.0 350.0
4 Australia 350.0 600.0 600.0 600.0 600.0 600.0 600.0 350.0 350.0 ... 150.0 150.0 150.0 150.0 150.0 150.0 150.0 150.0 150.0 150.0
... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
144 Vietnam 300.0 300.0 600.0 600.0 1000.0 1300.0 1700.0 2200.0 2800.0 ... 6800.0 8200.0 9800.0 11000.0 13000.0 13000.0 14000.0 14000.0 NaN NaN
145 Yemen 60.0 60.0 60.0 60.0 60.0 60.0 60.0 150.0 150.0 ... 600.0 600.0 600.0 600.0 1100.0 1200.0 1300.0 1400.0 1500.0 1600.0
146 South Africa 2200.0 3600.0 5900.0 9800.0 16000.0 26000.0 41000.0 61000.0 89000.0 ... 260000.0 300000.0 340000.0 370000.0 390000.0 390000.0 380000.0 340000.0 300000.0 270000.0
147 Zambia 23000.0 29000.0 34000.0 39000.0 44000.0 49000.0 53000.0 57000.0 60000.0 ... 69000.0 71000.0 70000.0 65000.0 60000.0 49000.0 42000.0 45000.0 NaN NaN
148 Zimbabwe 23000.0 32000.0 43000.0 55000.0 68000.0 82000.0 96000.0 110000.0 120000.0 ... 160000.0 160000.0 150000.0 150000.0 140000.0 130000.0 110000.0 98000.0 78000.0 58000.0

149 rows × 23 columns

country        object
year           object
HIV_deaths    float64
dtype: object
country year HIV_deaths
1639 Afghanistan 2001 150.0
1640 Angola 2001 10000.0
1641 Argentina 2001 2800.0
1642 Armenia 2001 150.0
1643 Australia 2001 150.0
... ... ... ...
3124 Vietnam 2010 NaN
3125 Yemen 2010 1500.0
3126 South Africa 2010 300000.0
3127 Zambia 2010 NaN
3128 Zimbabwe 2010 78000.0

1490 rows × 3 columns

Data Wrangling: HIV population data

country 1800 1801 1802 1803 1804 1805 1806 1807 1808 ... 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100
0 Afghanistan 3.28M 3.28M 3.28M 3.28M 3.28M 3.28M 3.28M 3.28M 3.28M ... 124M 125M 126M 126M 127M 128M 128M 129M 130M 130M
1 Angola 1.57M 1.57M 1.57M 1.57M 1.57M 1.57M 1.57M 1.57M 1.57M ... 139M 140M 142M 143M 144M 145M 147M 148M 149M 150M
2 Albania 400k 402k 404k 405k 407k 409k 411k 413k 414k ... 1.34M 1.32M 1.3M 1.29M 1.27M 1.25M 1.23M 1.22M 1.2M 1.18M
3 Andorra 2650 2650 2650 2650 2650 2650 2650 2650 2650 ... 52.8k 52.1k 51.5k 50.8k 50.2k 49.6k 49k 48.4k 47.8k 47.2k
4 UAE 40.2k 40.2k 40.2k 40.2k 40.2k 40.2k 40.2k 40.2k 40.2k ... 24.1M 24.3M 24.5M 24.7M 25M 25.2M 25.4M 25.7M 25.9M 26.1M
... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
192 Samoa 47.3k 47.3k 47.3k 47.3k 47.3k 47.3k 47.3k 47.2k 47.2k ... 370k 372k 374k 375k 377k 378k 380k 381k 382k 384k
193 Yemen 2.59M 2.59M 2.59M 2.59M 2.59M 2.59M 2.59M 2.59M 2.59M ... 107M 107M 107M 108M 108M 109M 109M 109M 110M 110M
194 South Africa 1.45M 1.45M 1.46M 1.46M 1.47M 1.47M 1.48M 1.49M 1.49M ... 92.4M 92.6M 92.9M 93.1M 93.3M 93.5M 93.7M 93.9M 94.1M 94.3M
195 Zambia 747k 758k 770k 782k 794k 806k 818k 831k 843k ... 61.1M 61.5M 61.9M 62.3M 62.7M 63.1M 63.4M 63.8M 64.1M 64.5M
196 Zimbabwe 1.09M 1.09M 1.09M 1.09M 1.09M 1.09M 1.09M 1.09M 1.09M ... 36.3M 36.4M 36.5M 36.6M 36.7M 36.8M 36.9M 37M 37.1M 37.2M

197 rows × 302 columns

['country',
 '2001',
 '2002',
 '2003',
 '2004',
 '2005',
 '2006',
 '2007',
 '2008',
 '2009',
 '2010']
country 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010
0 Afghanistan 20.3M 21.4M 22.7M 23.6M 24.4M 25.4M 25.9M 26.5M 27.5M 28.3M
1 Angola 16.7M 17.3M 17.9M 18.6M 19.3M 20M 20.8M 21.6M 22.4M 23.3M
2 Albania 3.15M 3.13M 3.12M 3.1M 3.08M 3.05M 3.02M 2.99M 2.96M 2.93M
3 Andorra 65.9k 66.5k 69.5k 74.3k 77.4k 79.6k 81.9k 83.5k 83.9k 80.7k
4 UAE 3.72M 3.96M 4.19M 4.43M 4.66M 5.01M 5.62M 6.3M 6.71M 6.94M
... ... ... ... ... ... ... ... ... ... ... ...
192 Samoa 183k 184k 185k 186k 187k 188k 189k 190k 192k 193k
193 Yemen 20.2M 20.8M 21.5M 22.1M 22.8M 23.5M 24.3M 25.1M 25.9M 26.8M
194 South Africa 47.6M 48M 48.5M 49M 49.5M 50M 50.5M 51.1M 51.7M 52.3M
195 Zambia 10.3M 10.6M 11M 11.3M 11.7M 12.1M 12.6M 13M 13.5M 14M
196 Zimbabwe 12M 12.1M 12.2M 12.4M 12.5M 12.6M 12.8M 13M 13.1M 13.4M

197 rows × 11 columns

['2001', '2002', '2003', '2004', '2005', '2006', '2007', '2008', '2009', '2010']
country 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010
0 Afghanistan 20300000.0 21400000.0 22700000.0 23600000.0 24400000.0 25400000.0 25900000.0 26500000.0 27500000.0 28300000.0
1 Angola 16700000.0 17300000.0 17900000.0 18600000.0 19300000.0 20000000.0 20800000.0 21600000.0 22400000.0 23300000.0
2 Albania 3150000.0 3130000.0 3120000.0 3100000.0 3080000.0 3050000.0 3020000.0 2990000.0 2960000.0 2930000.0
3 Andorra 65900.0 66500.0 69500.0 74300.0 77400.0 79600.0 81900.0 83500.0 83900.0 80700.0
4 UAE 3720000.0 3960000.0 4190000.0 4430000.0 4660000.0 5010000.0 5620000.0 6300000.0 6710000.0 6940000.0
... ... ... ... ... ... ... ... ... ... ... ...
192 Samoa 183000.0 184000.0 185000.0 186000.0 187000.0 188000.0 189000.0 190000.0 192000.0 193000.0
193 Yemen 20200000.0 20800000.0 21500000.0 22100000.0 22800000.0 23500000.0 24300000.0 25100000.0 25900000.0 26800000.0
194 South Africa 47600000.0 48000000.0 48500000.0 49000000.0 49500000.0 50000000.0 50500000.0 51100000.0 51700000.0 52300000.0
195 Zambia 10300000.0 10600000.0 11000000.0 11300000.0 11700000.0 12100000.0 12600000.0 13000000.0 13500000.0 14000000.0
196 Zimbabwe 12000000.0 12100000.0 12200000.0 12400000.0 12500000.0 12600000.0 12800000.0 13000000.0 13100000.0 13400000.0

197 rows × 11 columns

country year population
0 Afghanistan 2001 20300000.0
1 Angola 2001 16700000.0
2 Albania 2001 3150000.0
3 Andorra 2001 65900.0
4 UAE 2001 3720000.0
... ... ... ...
1965 Samoa 2010 193000.0
1966 Yemen 2010 26800000.0
1967 South Africa 2010 52300000.0
1968 Zambia 2010 14000000.0
1969 Zimbabwe 2010 13400000.0

1970 rows × 3 columns

Data Wrangling: expenditure data:

country 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010
0 Afghanistan NaN NaN NaN NaN NaN NaN NaN 1.48 1.48 1.48 1.48 1.48 1.48 1.48 1.58 1.59
1 Angola 5.00 2.68 3.57 3.15 1.76 3.26 6.06 3.74 4.83 4.12 4.38 6.06 5.75 6.40 10.10 7.18
2 Albania 5.26 6.34 6.47 6.10 7.18 7.03 7.24 7.32 7.64 9.23 9.79 9.05 8.46 8.21 8.42 8.42
3 Andorra 23.60 23.80 23.20 28.70 20.80 19.10 19.20 20.00 22.00 22.70 22.00 22.80 21.30 21.30 21.30 21.30
4 UAE 8.09 7.13 8.76 8.00 8.01 7.64 7.73 7.98 8.35 8.21 8.70 8.95 8.93 8.85 8.76 8.79
... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
187 Samoa 12.40 15.70 17.40 16.90 19.50 21.40 19.60 19.50 18.80 18.30 16.10 17.00 20.30 18.60 18.30 23.40
188 Yemen 6.92 5.17 6.13 7.83 8.49 8.30 8.37 7.71 7.62 6.24 4.80 4.87 4.30 4.30 4.31 4.33
189 South Africa 9.55 9.47 9.29 9.82 10.70 10.90 11.20 11.50 11.20 10.30 10.40 10.70 11.10 11.50 11.40 11.90
190 Zambia 10.40 13.30 15.50 13.30 9.76 9.38 10.50 13.60 13.30 14.20 14.70 16.40 13.40 15.30 15.70 15.60
191 Zimbabwe 12.10 12.10 12.10 12.10 10.00 10.70 9.26 NaN NaN NaN NaN NaN NaN NaN NaN NaN

192 rows × 17 columns

country     object
1995       float64
1996       float64
1997       float64
1998       float64
1999       float64
2000       float64
2001       float64
2002       float64
2003       float64
2004       float64
2005       float64
2006       float64
2007       float64
2008       float64
2009       float64
2010       float64
dtype: object
country                object
year                   object
health_budget_prop    float64
dtype: object
country year health_budget_prop
1425 Iraq 2002 0.100
1233 Iraq 2001 0.150
2036 Myanmar 2005 0.771
2612 Myanmar 2008 0.911
2420 Myanmar 2007 0.926
... ... ... ...
2953 Honduras 2010 NaN
2991 Mexico 2010 NaN
3007 Nicaragua 2010 NaN
3036 Somalia 2010 NaN
3071 Zimbabwe 2010 NaN

1920 rows × 3 columns

country year HIV_deaths population health_budget_prop
0 Afghanistan 2001 150.0 20300000.0 NaN
1 Angola 2001 10000.0 16700000.0 6.06
2 Argentina 2001 2800.0 37600000.0 14.30
3 Armenia 2001 150.0 3080000.0 6.73
4 Australia 2001 150.0 19400000.0 15.40
... ... ... ... ... ...
1475 Vietnam 2010 NaN 87500000.0 7.79
1476 Yemen 2010 1500.0 26800000.0 4.33
1477 South Africa 2010 300000.0 52300000.0 11.90
1478 Zambia 2010 NaN 14000000.0 15.60
1479 Zimbabwe 2010 78000.0 13400000.0 NaN

1480 rows × 5 columns

Merging combined datasets with the sub_saharian dataset.

country year HIV_deaths population health_budget_prop country_code
0 Afghanistan 2001 150.0 20300000.0 NaN AFG
148 Afghanistan 2002 150.0 21400000.0 1.48 AFG
296 Afghanistan 2003 150.0 22700000.0 1.48 AFG
444 Afghanistan 2004 350.0 23600000.0 1.48 AFG
592 Afghanistan 2005 350.0 24400000.0 1.48 AFG
... ... ... ... ... ... ...
887 Zimbabwe 2006 140000.0 12600000.0 NaN ZWE
1035 Zimbabwe 2007 130000.0 12800000.0 NaN ZWE
1183 Zimbabwe 2008 110000.0 13000000.0 NaN ZWE
1331 Zimbabwe 2009 98000.0 13100000.0 NaN ZWE
1479 Zimbabwe 2010 78000.0 13400000.0 NaN ZWE

1480 rows × 6 columns

Country country_code
0 Angola AGO
1 Benin BEN
2 Botswana BWA
3 Burkina Faso BFA
4 Burundi BDI
5 Cabo Verde CPV
6 Cameroon CMR
7 Central African Republic CAF
8 Chad TCD
9 Comoros COM
10 Congo (Brazzaville) COG
11 Congo (Kinshasa) COD
12 Cote d'Ivoire CIV
13 Djibouti DJI
14 Equatorial Guinea GNQ
15 Eritrea ERI
16 Eswatini SWZ
17 Ethiopia ETH
18 Gabon GAB
19 Gambia GMB
20 Ghana GHA
21 Guinea GIN
22 Guinea-Bissau GNB
23 Kenya KEN
24 Lesotho LSO
25 Liberia LBR
26 Madagascar MDG
27 Malawi MWI
28 Mali MLI
29 Mauritania MRT
30 Mauritius MUS
31 Mozambique MOZ
32 Namibia NAM
33 Niger NER
34 Nigeria NGA
35 Rwanda RWA
36 Sao Tome and Principe STP
37 Senegal SEN
38 Seychelles SYC
39 Sierra Leone SLE
40 Somalia SOM
41 South Africa ZAF
42 South Sudan SSD
43 Sudan SDN
44 Tanzania TZA
45 Togo TGO
46 Uganda UGA
47 Zambia ZMB
48 Zimbabwe ZWE
Country country_code country year HIV_deaths population health_budget_prop
0 Angola AGO Angola 2001 10000.0 16700000.0 6.06
1 Angola AGO Angola 2002 11000.0 17300000.0 3.74
2 Angola AGO Angola 2003 12000.0 17900000.0 4.83
3 Angola AGO Angola 2004 12000.0 18600000.0 4.12
4 Angola AGO Angola 2005 13000.0 19300000.0 4.38
... ... ... ... ... ... ... ...
435 Zimbabwe ZWE Zimbabwe 2006 140000.0 12600000.0 NaN
436 Zimbabwe ZWE Zimbabwe 2007 130000.0 12800000.0 NaN
437 Zimbabwe ZWE Zimbabwe 2008 110000.0 13000000.0 NaN
438 Zimbabwe ZWE Zimbabwe 2009 98000.0 13100000.0 NaN
439 Zimbabwe ZWE Zimbabwe 2010 78000.0 13400000.0 NaN

440 rows × 7 columns

Checking the combined dataset:

array(['Angola', 'Benin', 'Botswana', 'Burkina Faso', 'Burundi',
       'Cameroon', 'Central African Republic', 'Chad', 'Comoros',
       'Congo, Rep.', "Cote d'Ivoire", 'Djibouti', 'Equatorial Guinea',
       'Eritrea', 'Eswatini', 'Gabon', 'Gambia', 'Ghana', 'Guinea',
       'Guinea-Bissau', 'Kenya', 'Lesotho', 'Liberia', 'Madagascar',
       'Malawi', 'Mali', 'Mauritania', 'Mauritius', 'Mozambique',
       'Namibia', 'Niger', 'Nigeria', 'Rwanda', 'Sao Tome and Principe',
       'Senegal', 'Sierra Leone', 'Somalia', 'South Africa', 'Sudan',
       'Tanzania', 'Togo', 'Uganda', 'Zambia', 'Zimbabwe'], dtype=object)
country 1990 1991 1992 1993 1994 1995 1996 1997 1998 ... 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011

0 rows × 23 columns

country year population
35 Congo, Dem. Rep. 2001 52100000.0
36 Congo, Rep. 2001 3270000.0
232 Congo, Dem. Rep. 2002 53800000.0
233 Congo, Rep. 2002 3350000.0
429 Congo, Dem. Rep. 2003 55300000.0
430 Congo, Rep. 2003 3450000.0
626 Congo, Dem. Rep. 2004 57000000.0
627 Congo, Rep. 2004 3570000.0
823 Congo, Dem. Rep. 2005 58800000.0
824 Congo, Rep. 2005 3700000.0
1020 Congo, Dem. Rep. 2006 60600000.0
1021 Congo, Rep. 2006 3840000.0
1217 Congo, Dem. Rep. 2007 62500000.0
1218 Congo, Rep. 2007 3980000.0
1414 Congo, Dem. Rep. 2008 64400000.0
1415 Congo, Rep. 2008 4110000.0
1611 Congo, Dem. Rep. 2009 66400000.0
1612 Congo, Rep. 2009 4280000.0
1808 Congo, Dem. Rep. 2010 68600000.0
1809 Congo, Rep. 2010 4460000.0
country year health_budget_prop
1187 Congo, Dem. Rep. 2001 2.79
1188 Congo, Rep. 2001 4.22
1379 Congo, Dem. Rep. 2002 2.44
1380 Congo, Rep. 2002 3.63
1571 Congo, Dem. Rep. 2003 10.70
1572 Congo, Rep. 2003 4.35
1763 Congo, Dem. Rep. 2004 5.97
1764 Congo, Rep. 2004 5.11
1955 Congo, Dem. Rep. 2005 7.41
1956 Congo, Rep. 2005 6.17
2147 Congo, Dem. Rep. 2006 7.07
2148 Congo, Rep. 2006 5.45
2339 Congo, Dem. Rep. 2007 8.47
2340 Congo, Rep. 2007 5.29
2531 Congo, Dem. Rep. 2008 12.70
2532 Congo, Rep. 2008 5.29
2723 Congo, Dem. Rep. 2009 12.50
2724 Congo, Rep. 2009 5.29
2915 Congo, Dem. Rep. 2010 9.11
2916 Congo, Rep. 2010 5.29

Data Analysis:

  1. HIV Deaths:

Total Deaths:

This will be a value BOX!!!

'14,059,340.0'
14,059,340.0
Country country_code country year HIV_deaths population health_budget_prop HIV_mortality
430 Zimbabwe ZWE Zimbabwe 2001 150000.0 12000000.0 9.3 1250.0
20 Botswana BWA Botswana 2001 15000.0 1710000.0 9.7 877.2
210 Lesotho LSO Lesotho 2001 14000.0 2000000.0 9.0 700.0
420 Zambia ZMB Zambia 2001 68000.0 10300000.0 10.5 660.2
140 Eswatini SWZ Eswatini 2001 6700.0 1050000.0 10.2 638.1
... ... ... ... ... ... ... ... ...
239 Madagascar MDG Madagascar 2010 NaN 22200000.0 14.7 0.0
259 Mali MLI Mali 2010 NaN 15900000.0 10.6 0.0
289 Mozambique MOZ Mozambique 2010 NaN 23000000.0 12.2 0.0
409 Togo TGO Togo 2010 NaN 6730000.0 15.4 0.0
429 Zambia ZMB Zambia 2010 NaN 14000000.0 15.6 0.0

440 rows × 8 columns

  1. Budget Proportions:

Box plot

Data viz for the proportion of the health budget.

HIV Mortality Vs Proportion of Budget.

Scatter plot

Choropleth Map

year count
0 2001 44
1 2002 44
2 2003 44
3 2004 44
4 2005 44
5 2006 44
6 2007 44
7 2008 44
8 2009 44
9 2010 44